/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#apps {

  td .red {
    color: red;
  }
  .table thead th{
    vertical-align:top;
    padding-bottom: 0px;
  }
  .avg-table {
    table-layout: fixed;
    background-color: #F9F9F9;
    border-left:1px solid #DDD;
    td {
      text-align:center;
      border:none;
    }
  }

  #filter_buttons a.selected{
    cursor: default;
  }
  #filter_buttons a{
    cursor: pointer;
  }

  .clear_filter{
    width:46%;
    a {
      cursor: pointer;
    }
  }

  .runsList {
    table-layout: fixed;
    border: 1px solid silver;
    th {
      border-top:none;
    }
    td {
      word-wrap: break-word;
    }

    input, select{
      width: 76%;
    }

    .no-data{
      text-align: center;
    }

    input.input-super-mini{
      width: 47px;
      max-width: 57%;
    }

    label.checkbox input {
      width: auto;
    }
    .col0,
    td:first-child,
    th:first-child {
      width: 16%;
    }
    .col1,
    td:first-child + td + td,
    th:first-child + th + th{
      width: 15%;
    }
    .col2,
    td:first-child + td + td + td,
    th:first-child + th + th + th{
      width: 11%;
    }
    .col3,
    td:first-child + td + td + td + td,
    th:first-child + th + th + th + th{
      width: 11%;
    }
    .col4,.col5,.col6,.col7,
    td:first-child + td + td + td + td + td,
    th:first-child + th + th + th + th + th,
    td:first-child + td + td + td + td + td + td,
    th:first-child + th + th + th + th + th + th,
    td:first-child + td + td + td + td + td + td + td,
    th:first-child + th + th + th + th + th + th + th,
    td:first-child + td + td + td + td + td + td + td + td,
    th:first-child + th + th + th + th + th + th + th + th
    {
      width: 9%;
    }
    .col8,
    td:first-child + td + td + td + td + td + td + td + td + td,
    th:first-child + th + th + th + th + th + th + th + th + th{
      width: 13%;
    }
  }

  .dropdown-menu label.checkbox {
    margin-left: 10px;
  }
  .dropdown-menu label.checkbox {
    margin-left: 10px;
  }
  .icon-star{
    color: gray;
    &.stared {
      color: inherit;
    }
    &:hover {
      text-decoration: none;
    }
  }
  a.a {
    cursor: pointer;
    width:25px;
    height: 25px;
    display: block;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    left:50%;
    margin-left:-13px;
    margin-top: 36px;
    font-size:30px;
    color: gray;
    &.active {
      color: #08C;
    }
  }
  .avg-info {
    font-size:16px;
    font-weight:700;
  }
  .compare-info {
    font-size:12px;
  }
  .search-bar {

  }
  .clear {
    clear:both;
  }
  .content {
    padding: 0;
  }
  .app-table-row.hover{
    opacity:0.8 ;
  }
  .app-table-row{
    cursor: pointer;
  }
  .filter_info > .span4 > a.selected{
      cursor: default;
      text-decoration: none;
      color: #000;
  }
  .page-bar {
    border: 1px solid silver;
    text-align:right;
    div {
      display: inline-block;
      margin:0 10px;
    }
    .items-on-page {
      label {
        display:inline;
      }
      select {
        margin-bottom: 4px;
        margin-top: 4px;
        width:70px;
      }
    }
    .paging_two_button {
      a {
        padding:0 5px;
      }
      a.paginate_disabled_next, a.paginate_disabled_previous {
        color: gray;
        &:hover {
          color: gray;
          text-decoration: none;
          cursor: default;
          i {
            cursor: default;
          }
        }
      }

      a.paginate_next, a.paginate_previous {
        &:hover {
          text-decoration: none;
          cursor: pointer;
        }
      }
    }
  }
  #graph1 {
    margin-left: 30px;
    width: 440px;
    #legend_container {
      margin: 40px 0 0 20px;
    }
  }
  #graph2 {
    margin-right: 30px;
    width: 500px;
    #tasks_legend_container {
      margin: 40px 0 0 20px;
    }
  }

  tr.containerRow > td{
    background: #f9f9f9;
  }
  button {
    margin: 0 2px;
  }
  svg{
    vertical-align: top; //remove extra spaces after svg element
  }

  ul.nav-tabs{
    margin-bottom: 0;
  }

  #jobs, #bars{
    border: 1px solid #ddd;
    border-top: none;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
    width: auto;
  }

  #jobs h2{
    margin-top: 0;
  }
//fix stripped in inner table
  .table-striped tbody .even td,
  .table-striped tbody .even th {
    background-color: #fff;
  }

  .sorting_asc { background: url() no-repeat right 50%; }
  .sorting_desc { background: url() no-repeat right 50%; }
  .sorting { background: url() no-repeat right 50%; }

  a.paginate_disabled_next, a.paginate_disabled_previous {
    color: gray;
    &:hover {
      color: gray;
      text-decoration: none;
    }
  }

  a.paginate_enabled_next, a.paginate_enabled_previous {
    &:hover {
      text-decoration: none;
    }
  }

  a.ui-icon-circle-close {
    float: right;
    opacity: 0.2;
    padding: 1px;
    position: relative;
    right: -4px;
    margin-top: 6px;
    z-index:10;
    &:hover {
      opacity: 0.7;
    }
  }
  .notActive {
    a.ui-icon-circle-close {
      visibility: hidden;
    }
  }
}
#hover-op-table{
  margin-bottom: 2px;
  td{
    padding: 2px;
    word-wrap: break-word;
  }
}

#hive-job-details{
  #operator-table{
    td {
      border-top: 1px solid #dddddd;
    }
    tr td:first-child{
       width: 20%;
       overflow: auto;
    }
    td:first-child + td,
    th:first-child + th {
      width: 80%;
    }
  }
}


#jobs {

  .jobs-type {
    float: right;
    margin-top: -24px;
  }

  .new-jobs-link {
    float: left;
    margin-left: 496px;
    margin-top: -20px;
  }

  #filtered-jobs{
    float: left;
    margin-top: 8px;
  }

  .jobs_head{
    height: 30px;
  }

  .page-bar {
    border: 1px solid #E4E4E4;
    color: #7B7B7B;
    text-align: right;
    font-size: 12px;
    label {
      font-size: 12px;
    }
    div {
      display: inline-block;
      margin:0 10px;
    }
    .items-on-page {
      label {
        display:inline;
      }
      select {
        margin-bottom: 4px;
        margin-top: 4px;
        width:70px;
        font-size: 12px;
        height: 27px;
      }
    }

    .paging_two_button {
      a {
        padding:0 5px;
      }
      a.paginate_disabled_next, a.paginate_disabled_previous {
        color: gray;
        &:hover i{
          color: gray;
          text-decoration: none;
          cursor: default;
        }
      }

      a.paginate_next, a.paginate_previous {
        &:hover {
          text-decoration: none;
          cursor: pointer;
        }
      }
    }
  }

  #innerTable {
    td {
      word-wrap: break-word;
    }
  }

  #jobs-table {

    .is-not-link{
      cursor: default;
      color: #000000;
      text-decoration: none;
    }

    .apply-btn {
      font-size: 12px;
      padding: 0px 8px;
      margin-left: 6px;
      margin-top: -8px;
      line-height: 22px;
    }

    .input-120{
      width: 120px;
    }

    .label-row {
      font-size: 0.9em;
      th {
        padding: 4px 4px 4px 8px;
      }
      .active-sort {
        color: #555555;
        text-decoration: none;
        background-color: #e5e5e5;
        -webkit-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
        -moz-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
        box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
      }
    }
    thead {
      background: none repeat scroll 0 0 #F8F8F8;
    }
    #filter-row {
      th {
        padding: 0px;
        padding-left: 8px;
      }
      .active-filter {
        color: #555555;
        text-decoration: none;
        background-color: #e5e5e5;
        -webkit-box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.05);
        -moz-box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.05);
        box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.05);
      }
      input {
        font-size: 12px;
        height: 14px;
      }
      select {
        height: 27px;
        font-size: 12px;
      }
      .start-time a.ui-icon-circle-close {
          margin-top: 7px;
      }
      .filter-btn {
        color: #999999;
        font-size: 12px;
        line-height: 14px;
        padding-left: 6px;
        text-align: left;
        width: 100px;
        .icon-filter {
          color: #999999;
        }
      }
    }
    th {
      border-top: none;
    }
    th, td {
      border-left-width: 0;
    }
    .no-data{
      text-align: center;
    }
    a.job-link {
      width: 100%;
      overflow: auto;
      word-wrap: break-word;
      display: inline-block;
    }
    td:first-child,
    th:first-child {
      border-left-width: 1px;
      width: 14px;
    }
    td:first-child + td,
    th:first-child + th {
      width: 36%;
    }
    td:first-child + td + td,
    th:first-child + th + th{
      width: 20%;
    }
    td:first-child + td + td + td,
    th:first-child + th + th + th,
    td:first-child + td + td + td + td,
    th:first-child + th + th + th + th{
      width: 16%;
    }
    td:first-child + td + td + td + td + td,
    th:first-child + th + th + th + th + th{
      width: 12%;
    }
  }
  .table {
    table-layout: fixed;
    th {
      border-top: none;
    }
    ul.filter-components {
      padding: 5px 0;
      background: #777777;
      color: #ffffff;
      font-weight: normal;
      font-size: 12px;
      label {
        font-size: 12px;
      }
      li {
        display: block;
        padding: 3px 0 3px 5px;
        line-height: 20px;
        label.checkbox {
          padding-left: 3px;
        }
        input[type="checkbox"] {
          margin: 4px 4px 2px 2px;
        }
      }
      li#title-bar {
        text-align: left;
        border-bottom: 1px solid #e4e4e4;
        a.close {
          background: #777777;
          display: inline;
          color: #ffffff;
          padding-left: 35px;
          padding-right: 12px;
          text-shadow: 0 1px 0 #ffffff;
          float: none;
          font-size: 10px;
          opacity: 0.6;
        }
        a.close:hover {
          background: #777777;
          opacity: 1.0;
        }
      }
      li#selector-bar {
        text-align: left;
        border-bottom: 1px solid #e4e4e4;
        font-size: 6px;
      }
      li#list-area {
        font-weight: normal;
        text-align: left;
      }
      li#button-bar {
        text-align: center;
        button {
          font-size: 12px;
        }
      }
      ul {
        margin-left: 10px;
      }
      &>li {
        &>ul {
          height: 150px;
          margin-left: 0;
          overflow-y: scroll;
        }
      }
    }

    .sorting_asc {
      background:
        url() no-repeat right 50%;
    }
    .sorting_desc {
      background: url() no-repeat right 50%;
    }
    .sorting {
      background: url(	) no-repeat right 50%;
    }
    div.view-wrapper {
      input[type="checkbox"], .btn-group {
        margin-bottom: 9px;
      }
    }

    a.ui-icon-circle-close {
      float: right;
      opacity: 0.2;
      padding: 1px 0;
      position: relative;
      right: 0px;
      margin-top: 3px;
      z-index: 10;
      &:hover {
        opacity: 0.7;
      }
    }
    .notActive {
      a.ui-icon-circle-close {
        visibility: hidden;
      }
    }
  }
}

.jobs-tooltip {
  .tooltip-inner {
    max-width: 400px;
  }
}

.btn-group button.single-btn-group{
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -moz-border-radius: 4px;
}

/*Big modal window*/
.big-modal {
  .modal {
    top: -999px;
    left: -999px;
    .modal-body {
      min-height: 430px;
      max-height: none;
    }
    width: 1150px;
    margin: 0;
  }

  .clear {
    clear:both;
  }
  > div > .dataTable {
    border: 1px solid silver;
    th {
      border-top:none;
    }
  }
  .content {
    padding: 0;
  }

  .page-bar {
    border: 1px solid silver;
    text-align:right;
    div {
      display: inline-block;
      margin:0 10px;
    }
    .dataTables_length {
      label {
        display:inline;
      }
      select {
        margin-bottom: 4px;
        margin-top: 4px;
        width:70px;
      }
    }
    .dataTables_paginate {
      a {
        padding:0 5px;
      }
    }
  }

  .rickshaw_legend {
    background-color: #999 !important;
    li:hover {
      background-color: #999 !important;
    }
  }
  #graph1, #graph2 {
    svg {
      g {
        g:nth-child(1) {
          display: none;
        }
      }
    }
  }
  #graph1 {
    margin-left: 30px;
    width: 440px;
    #chart {
      left: 30px;
      overflow: visible;
      position: relative;
    }
    #legend_container {
      margin: 40px 0 0 20px;
    }
    #y-axis {
      position: absolute;
      top: 182px;
      bottom: 0;
      width: 30px;
    }
  }

  #graph2 {
    margin-right: 30px;
    width: 500px;
    #job_tasks {
      left: 30px;
      overflow: visible;
      position: relative;
    }
    #tasks_legend_container {
      margin: 40px 0 0 20px;
    }
    #y-axis2 {
      position: absolute;
      top: 182px;
      bottom: 0;
      width: 30px;
      overflow: hidden;
      height: 210px;
    }
  }

  #job_tasks .axis line,
  #job_tasks .axis path {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
  }
  #job_tasks text.axislabel {
    pointer-events: none;
    text-anchor: middle;
  }

  ul.nav-tabs{
    margin-bottom: 0;
  }

  #bars {
    height: 350px;
  }

  #jobs, #bars{
    border: 1px solid #ddd;
    border-top: none;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
    width: auto;
  }

  #jobs h2{
    margin-top: 0;
  }
//fix stripped in inner table
  .table-striped tbody tr:nth-child(odd)
  td .table-striped tbody
  tr:nth-child(odd) td,
  tr:nth-child(even) th{
    background-color: none;
  }

  .sorting_asc { background: url() no-repeat right 50%; }
  .sorting_desc { background: url() no-repeat right 50%; }
  .sorting { background: url() no-repeat right 50%; }

  a.paginate_disabled_next, a.paginate_disabled_previous {
    color: gray;
    &:hover {
      color: gray;
      text-decoration: none;
    }
  }

  a.paginate_enabled_next, a.paginate_enabled_previous {
    &:hover {
      text-decoration: none;
    }
  }

  div.view-wrapper {
    float: left;
  }

  a.ui-icon-circle-close {
    float: right;
    opacity: 0.2;
    padding: 1px;
    position: relative;
    top: -32px;
    z-index: 10;
    &:hover {
      opacity: 0.7;
    }
  }
  .notActive {
    a.ui-icon-circle-close {
      visibility: hidden;
    }
  }
  #dag_viewer_legend {
    border: 1px solid #DDDDDD;
    padding: 10px;
    padding-left: 20px;
    float: left;
    ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    li {
      display: block;
      width: 25%;
      float: left;
    }
    span {
      width: 15px;
      height: 15px;
      display: block;
      float: left;
      margin-right: 5px;
    }
    #job {
      border: 1px solid #333;
      background: #ccc;
    }
    #jobdone {
      border: 1px solid #333;
      background: rgba(0,128,0,0.8);
    }
    #allmap {
      border: 2px solid #007000;
    }
    #map {
      border: 2px solid #007000;
      background: rgba(0,128,0,0.8);
    }
    #allshuffle {
      border: 2px solid #97BDC9;
    }
    #shuffle {
      border: 2px solid #97BDC9;
      background: rgba(173,216,230,0.8);
    }
    #allreduce {
      border: 2px solid #3D729E;
    }
    #reduce {
      border: 2px solid #3D729E;
      background: rgba(70,130,180,0.8);
    }
  }
}

.jobs-custom-dates{
  .help-inline{
    color:#b94a48;
  }
}


@media all and (max-width: 1024px) {
  .big-modal {
    #graph1 {
      width: 300px;
    }
    #graph2 {
      width: 400px;
  }
  }
}
